/*
PearReview - The peer review assistant.
Copyright (C) 2009  Dimitrij Pankratz, Anton Musichin
http://www.pearreview.com, info@pearreview.com

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

package com.pearreview.util.review;

public class Attendee extends AbstractIdItem {

	private static final long serialVersionUID = 1668153962034991389L;
	
	private String name;
	private String contact;
	private AttendeeRole role;
	private IdList<Aspect> aspects;
	
	public Attendee() {
		super();
	}
	
	public AttendeeRole getRole() {
		return this.role;
	}	
	public void setRole(AttendeeRole role) {
		this.role = role;
	}
	
	public String getName() {
		return this.name;
	}	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getContact() {
		return this.contact;
	}	
	public void setContact(String contact) {
		this.contact = contact;
	}
	
	public void setAspects(IdList<Aspect> aspects) {
		this.aspects = aspects;
	}

	public IdList<Aspect> getAspects() {
		return aspects;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof AvailableAttendee)
			return ((AvailableAttendee)obj).getAttendee() == this;
		
		return super.equals(obj);
	}

	@Override
	public String toString() {
		return "[id: " + getId() + ", "
				+ "name: " + getName() + ", "
				+ "contact: " + getContact() + ", "
				+ "role: " + getRole() + "]";
	}
}
